#include "Config.java.in"

//package fr.online.rzr;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
import android.view.View;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.Window;
import android.widget.TextView;

/**
 * Android midlet
 * @author www.Philippe.COVAL.free.fr
 * Copyright and License : http://rzr.online.fr/license.htm
 **/
public class Diet3DActivity 
extends Activity 
{

  private static final int MENU_START = 6;
  private static final int MENU_STOP = 7;

 // @Override
    public boolean onCreateOptionsMenu(Menu menu) 
    {
      super.onCreateOptionsMenu(menu);
      menu.add(0, MENU_START, 0, "start");
      menu.add(0, MENU_STOP, 0, "stop");
      return true;
    }

  Diet3DCanvas mCanvas = null;

  /** Called when the activity is first created. */
 // @Override
    public void onCreate(Bundle savedInstanceState) 
    {
      super.onCreate(savedInstanceState);
      mCanvas = new Diet3DCanvas(this);
      mCanvas.mRender.init( DIET3D_SCREEN_HEIGHT, DIET3D_SCREEN_WIDTH);
      mCanvas.mRender.toggleMode( 2 );
      setContentView(mCanvas);
    }
    
 // @Override
    public boolean onOptionsItemSelected(MenuItem item) 
    {
      switch (item.getItemId()) {
      case MENU_START:
	mCanvas.start();
	return true;
      case MENU_STOP:
	mCanvas.stop();
	return true;
      }

      return false;
    }
}
//TODO:  dalvikvm -classpath /data/app/fr.online.rzr.apk fr.online.rzr.Diet3DActivity

//#eof "$Id: Diet3DActivity.java.in,v 1.4 2008-12-28 23:49:32 rzr Exp $"
